INCLUDE (CMakeForceCompiler)

SET(CMAKE_SYSTEM_NAME generic)
SET(CMAKE_SYSTEM_VERSION 1)

SET(M1_CUTILS "C:/bachmann/SolutionCenter/V1.70Release/cutils/GnuTools-4.1.2" CACHE PATH "Bachmann M1 CUTILS Directory")
message(${M1_CUTILS})
# specify the cross compiler
CMAKE_FORCE_C_COMPILER(${M1_CUTILS}/bin/i386-wrs-vxworks-gcc.exe GNU)
CMAKE_FORCE_CXX_COMPILER(${M1_CUTILS}/bin/i386-wrs-vxworks-c++.exe GNU)


# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/../GnuTools/target/h)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/include/befc)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/include/c++/4.1.2)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/include/c++/4.1.2/i386-wrs-vxworks)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/lib/gcc/i386-wrs-vxworks/4.1.2/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/i386-wrs-vxworks/sys-include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/i386-wrs-vxworks/sys-include/wrn/coreip)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ${M1_CUTILS}/../mcsdk/msys/inc)



ADD_DEFINITIONS(-Wall -march=pentium -nostdinc -O0 -fno-builtin -fno-defer-pop -D_POSIX_THREAD_ATTR_STACKSIZE -DCPU_FAMILY=I80X86 -ggdb)
